package xin.yangshuai.basic01.generic;

import java.util.ArrayList;
import java.util.List;

/**
 * Main
 *
 * @author shuai
 * @date 2022/7/13
 */
public class Main {

    public static void main(String[] args) {
        list1();
        list2();

//        MyGeneric<String> myGeneric = new MyGeneric<>();
//        myGeneric.set("123");
//        String s = myGeneric.get();
//        System.out.println(s);

    }

    public static void list1() {
        List<String> list = new ArrayList();
        list.add("qwe");
        String s = list.get(0);
        System.out.println(s);
    }

    public static void list2() {
        List list = new ArrayList();
        list.add("qwe");
        list.add(123);
        Object s = list.get(0);
        System.out.println(s);
    }
}
